﻿// <copyright file="UserAuthFailedException.cs" company="Ecole Normale Supérieure">
// Released under GPLv2
// </copyright>
// <summary>Contains the user exception base class</summary>

namespace Sqwarea.GameLogic.Exceptions
{
    using System;
    using System.Runtime.Serialization;
    using Sqwarea.Persistence;

    /// <summary>
    /// Exception thrown when user auth failed
    /// </summary>
    [Serializable]
    public class UserAuthFailedException : UserException
    {
        /// <summary>
        /// Initializes a new instance of the UserAuthFailedException class
        /// </summary>
        /// <param name="user">User causing the exception</param>
        /// <param name="message">Exception message</param>
        public UserAuthFailedException(User user, string message)
            : base(user, message)
        {
        }

        /// <summary>
        /// Initializes a new instance of the UserAuthFailedException class
        /// </summary>
        /// <param name="message">Exception message</param>
        public UserAuthFailedException(string message)
            : base(message)
        {
        }

        /// <summary>
        /// Initializes a new instance of the UserAuthFailedException class
        /// </summary>
        public UserAuthFailedException() : base()
        {
        }

        /// <summary>
        /// Initializes a new instance of the UserAuthFailedException class
        /// </summary>
        /// <param name="message">Exception message</param>
        /// <param name="ex">Parent exception</param>
        public UserAuthFailedException(string message, Exception ex) : base(message, ex)
        {
        }

        /// <summary>
        /// Initializes a new instance of the UserAuthFailedException class
        /// </summary>
        /// <param name="info">Serialization infos</param>
        /// <param name="context">Streaming context</param>
        protected UserAuthFailedException(SerializationInfo info, StreamingContext context) 
            : base(info, context)
        {
        }
    }
}
